package com.GGG.cloud.house.web;

import com.GGG.cloud.house.domain.entity.Properties;
import com.GGG.cloud.house.domain.entity.PropertiesRentType;
import com.GGG.cloud.house.domain.vo.PropertiesAndRentTypeVO;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;

/**
 * @Desc
 * @Author Administrator
 * @Date 2020/10/03 23:02
 * @Address
 * @Copyright
 * @Version
 */
@Controller
public class PropertiesListLeftSidebarController {

    @RequestMapping("properties-list-left-sidebar.html")
    public String propertiesListLeftSidebar(ModelMap modelMap){
        modelMap.put("title","房产交易平台");
        modelMap.put("desc","房产列表显示左倾式格局");
        modelMap.put("info","Properties Left Sidebar");

        //定义总的存放数据的集合
        List<PropertiesAndRentTypeVO> andRentTypeVOS = new ArrayList<>();

        Properties properties1 = new Properties();
        //图片地址
        properties1.setPictureUrl("assets/images/property/property-1.jpg");
        //是否是热点和特色房产
        properties1.setIsHot((byte)0);
        properties1.setIsSpecial((byte)0);
        //房产描述信息
        properties1.setDescription("MayaKanon de Villa is the best theme for elit, sed door dolor sit amet, conse ctetur adipiscing elit, sed do eiud in tempor incididun");
        //面积
        properties1.setSquare(550F);
        //车位
        properties1.setGarageNumber(3);
        //卫生间数量
        properties1.setBathroomNumber(3);
        //房间数量
        properties1.setRoomNumber(6);
        //房产标题
        properties1.setTitle("江南宅院");
        //地址
        properties1.setAddress("锦江区东大街下东大街568号");
        //价格
        properties1.setPrice(550F);
        PropertiesRentType rentType1 = new PropertiesRentType();
        rentType1.setTypeName("出租");

        PropertiesAndRentTypeVO vo1 = new PropertiesAndRentTypeVO();
        vo1.setProperties(properties1);
        vo1.setPropertiesRentType(rentType1);

        //数据一放进集合
        andRentTypeVOS.add(vo1);

        Properties properties2 = new Properties();
        //图片地址
        properties2.setPictureUrl("assets/images/property/property-1.jpg");
        //是否是热点和特色房产
        properties2.setIsHot((byte)0);
        properties2.setIsSpecial((byte)1);
        //房产描述信息
        properties2.setDescription("MayaKanon de Villa is the best theme for elit, sed door dolor sit amet, conse ctetur adipiscing elit, sed do eiud in tempor incididun");
        //面积
        properties2.setSquare(550F);
        //车位
        properties2.setGarageNumber(3);
        //卫生间数量
        properties2.setBathroomNumber(3);
        //房间数量
        properties2.setRoomNumber(6);
        //房产标题
        properties2.setTitle("江南宅院");
        //地址
        properties2.setAddress("锦江区东大街下东大街568号");
        //价格
        properties2.setPrice(550F);
        PropertiesRentType rentType2 = new PropertiesRentType();
        rentType2.setTypeName("出租");

        PropertiesAndRentTypeVO vo2 = new PropertiesAndRentTypeVO();
        vo2.setProperties(properties2);
        vo2.setPropertiesRentType(rentType2);

        //数据一放进集合
        andRentTypeVOS.add(vo2);


        Properties properties3 = new Properties();
        //图片地址
        properties3.setPictureUrl("assets/images/property/property-1.jpg");
        //是否是热点和特色房产
        properties3.setIsHot((byte)1);
        properties3.setIsSpecial((byte)0);
        //房产描述信息
        properties3.setDescription("MayaKanon de Villa is the best theme for elit, sed door dolor sit amet, conse ctetur adipiscing elit, sed do eiud in tempor incididun");
        //面积
        properties3.setSquare(550F);
        //车位
        properties3.setGarageNumber(3);
        //卫生间数量
        properties3.setBathroomNumber(3);
        //房间数量
        properties3.setRoomNumber(6);
        //房产标题
        properties3.setTitle("江南宅院");
        //地址
        properties3.setAddress("锦江区东大街下东大街568号");
        //价格
        properties3.setPrice(550F);
        PropertiesRentType rentType3 = new PropertiesRentType();
        rentType3.setTypeName("出租");

        PropertiesAndRentTypeVO vo3 = new PropertiesAndRentTypeVO();
        vo3.setProperties(properties3);
        vo3.setPropertiesRentType(rentType3);

        //数据一放进集合
        andRentTypeVOS.add(vo3);

        Properties properties4 = new Properties();
        //图片地址
        properties4.setPictureUrl("assets/images/property/property-1.jpg");
        //是否是热点和特色房产
        properties4.setIsHot((byte)1);
        properties4.setIsSpecial((byte)0);
        //面积
        properties4.setSquare(550F);
        //房产描述信息
        properties4.setDescription("MayaKanon de Villa is the best theme for elit, sed door dolor sit amet, conse ctetur adipiscing elit, sed do eiud in tempor incididun");
        //车位
        properties4.setGarageNumber(3);
        //卫生间数量
        properties4.setBathroomNumber(3);
        //房间数量
        properties4.setRoomNumber(6);
        //房产标题
        properties4.setTitle("江南宅院");
        //地址
        properties4.setAddress("锦江区东大街下东大街568号");
        //价格
        properties4.setPrice(550F);
        PropertiesRentType rentType4 = new PropertiesRentType();
        rentType4.setTypeName("出租");

        PropertiesAndRentTypeVO vo4 = new PropertiesAndRentTypeVO();
        vo4.setProperties(properties4);
        vo4.setPropertiesRentType(rentType4);

        //数据一放进集合
        andRentTypeVOS.add(vo4);

        Properties properties5 = new Properties();
        //图片地址
        properties5.setPictureUrl("assets/images/property/property-1.jpg");
        //是否是热点和特色房产
        properties5.setIsHot((byte)1);
        properties5.setIsSpecial((byte)0);
        //面积
        properties5.setSquare(550F);
        //房产描述信息
        properties5.setDescription("MayaKanon de Villa is the best theme for elit, sed door dolor sit amet, conse ctetur adipiscing elit, sed do eiud in tempor incididun");
        //车位
        properties5.setGarageNumber(3);
        //卫生间数量
        properties5.setBathroomNumber(3);
        //房间数量
        properties5.setRoomNumber(6);
        //房产标题
        properties5.setTitle("江南宅院");
        //地址
        properties5.setAddress("锦江区东大街下东大街568号");
        //价格
        properties5.setPrice(550F);
        PropertiesRentType rentType5 = new PropertiesRentType();
        rentType5.setTypeName("出租");

        PropertiesAndRentTypeVO vo5 = new PropertiesAndRentTypeVO();
        vo5.setProperties(properties5);
        vo5.setPropertiesRentType(rentType5);

        //数据一放进集合
        andRentTypeVOS.add(vo5);

        Properties properties6 = new Properties();
        //图片地址
        properties6.setPictureUrl("assets/images/property/property-1.jpg");
        //是否是热点和特色房产
        properties6.setIsHot((byte)1);
        properties6.setIsSpecial((byte)0);
        //面积
        properties6.setSquare(550F);
        //车位
        properties6.setGarageNumber(3);
        //房产描述信息
        properties6.setDescription("MayaKanon de Villa is the best theme for elit, sed door dolor sit amet, conse ctetur adipiscing elit, sed do eiud in tempor incididun");
        //卫生间数量
        properties6.setBathroomNumber(3);
        //房间数量
        properties6.setRoomNumber(6);
        //房产标题
        properties6.setTitle("江南宅院");
        //地址
        properties6.setAddress("锦江区东大街下东大街568号");
        //价格
        properties6.setPrice(550F);
        PropertiesRentType rentType6 = new PropertiesRentType();
        rentType6.setTypeName("出租");

        PropertiesAndRentTypeVO vo6 = new PropertiesAndRentTypeVO();
        vo6.setProperties(properties6);
        vo6.setPropertiesRentType(rentType6);

        //数据一放进集合
        andRentTypeVOS.add(vo6);
        modelMap.put("andRentTypeVOS",andRentTypeVOS);

//左边的内容

        //定义总的存放数据的集合
        List<PropertiesAndRentTypeVO> andRentTypeVOS1 = new ArrayList<>();

        Properties properties_1 = new Properties();
        //图片地址
        properties_1.setPictureUrl("assets/images/property/sidebar-property-1.jpg");
        //房产标题
        properties_1.setTitle("江南宅院");
        //地址
        properties_1.setAddress("锦江区东大街下东大街568号");
        //价格
        properties_1.setPrice(550F);
        PropertiesRentType rentType_1 = new PropertiesRentType();
        rentType_1.setTypeName("出租");

        PropertiesAndRentTypeVO vo_1 = new PropertiesAndRentTypeVO();
        vo_1.setProperties(properties_1);
        vo_1.setPropertiesRentType(rentType_1);

        andRentTypeVOS1.add(vo_1);


        Properties properties_2 = new Properties();
        //图片地址
        properties_2.setPictureUrl("assets/images/property/sidebar-property-1.jpg");
        //房产标题
        properties_2.setTitle("江南宅院");
        //地址
        properties_2.setAddress("锦江区东大街下东大街568号");
        //价格
        properties_2.setPrice(550F);
        PropertiesRentType rentType_2 = new PropertiesRentType();
        rentType_2.setTypeName("出租");

        PropertiesAndRentTypeVO vo_2 = new PropertiesAndRentTypeVO();
        vo_2.setProperties(properties_2);
        vo_2.setPropertiesRentType(rentType_2);

        andRentTypeVOS1.add(vo_2);


        Properties properties_3 = new Properties();
        //图片地址
        properties_3.setPictureUrl("assets/images/property/sidebar-property-1.jpg");
        //房产标题
        properties_3.setTitle("江南宅院");
        //地址
        properties_3.setAddress("锦江区东大街下东大街568号");
        //价格
        properties_3.setPrice(550F);
        PropertiesRentType rentType_3 = new PropertiesRentType();
        rentType_3.setTypeName("出售");

        PropertiesAndRentTypeVO vo_3 = new PropertiesAndRentTypeVO();
        vo_3.setProperties(properties_3);
        vo_3.setPropertiesRentType(rentType_3);

        andRentTypeVOS1.add(vo_3);

        modelMap.put("andRentTypeVOS1",andRentTypeVOS1);
        return "properties-list-left-sidebar";
    }
}
